﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Flynn.Core.ConnectionFactories;
using MbUnit.Framework;

namespace Flynn.Core.ConnectionFacories.Tests
{
    [TestFixture]
    public class ConnectionFactoryAttributeFixture
    {
        [Test]
        [ExpectedException(typeof(ArgumentNullException))]
        public void FriendlyName_Must_Not_Be_Null()
        {
            new ConnectionFactoryAttribute(null);
        }

        [Test]
        [ExpectedException(typeof(ArgumentException))]
        public void FriendlyName_Must_Not_Be_Empty()
        {
            new ConnectionFactoryAttribute(string.Empty);
        }

        [Test]
        public void FriendlyName_Is_Set()
        {
            ConnectionFactoryAttribute attribute = new ConnectionFactoryAttribute("ConnectionFactory");

            Assert.AreEqual("ConnectionFactory", attribute.FriendlyName);
        }
    }
}
